package com.dragon.modules.yuegou.query.marketing;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.marketing.ActivitySpuRefEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;

/**
 * 活动奖品表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-08-07 13:55:36
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ActivitySpuRefQuery extends ActivitySpuRefEntity implements Query<ActivitySpuRefEntity>{

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈id查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 奖品标题查询条件 */
	@JsonUnwrapped(prefix = "title")
	private Condition<String> titleCondition;

    /** 商品id查询条件 */
	@JsonUnwrapped(prefix = "skuId")
	private Condition<String> skuIdCondition;

    /** 活动id查询条件 */
	@JsonUnwrapped(prefix = "activityId")
	private Condition<String> activityIdCondition;

    /** 商品名称查询条件 */
	@JsonUnwrapped(prefix = "spuTitle")
	private Condition<String> spuTitleCondition;

    /** 奖品数量查询条件 */
	@JsonUnwrapped(prefix = "amount")
	private Condition<Integer> amountCondition;

    /** 中奖概率查询条件 */
	@JsonUnwrapped(prefix = "rate")
	private Condition<BigDecimal> rateCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ActivitySpuRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ActivitySpuRefQuery(ActivitySpuRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ActivitySpuRefQuery(ActivitySpuRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.titleCondition != null) {
			this.titleCondition = other.titleCondition.copy();
		}
		if(other.skuIdCondition != null) {
			this.skuIdCondition = other.skuIdCondition.copy();
		}
		if(other.activityIdCondition != null) {
			this.activityIdCondition = other.activityIdCondition.copy();
		}
		if(other.spuTitleCondition != null) {
			this.spuTitleCondition = other.spuTitleCondition.copy();
		}
		if(other.amountCondition != null) {
			this.amountCondition = other.amountCondition.copy();
		}
		if(other.rateCondition != null) {
			this.rateCondition = other.rateCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ActivitySpuRefEntity> toQueryWrapper() {
		QueryWrapper<ActivitySpuRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (titleCondition != null) {
			titleCondition.toWrapper(wrapper, COL_TITLE);
		}
		if (skuIdCondition != null) {
			skuIdCondition.toWrapper(wrapper, COL_SKU_ID);
		}
		if (activityIdCondition != null) {
			activityIdCondition.toWrapper(wrapper, COL_ACTIVITY_ID);
		}
		if (spuTitleCondition != null) {
			spuTitleCondition.toWrapper(wrapper, COL_SPU_TITLE);
		}
		if (amountCondition != null) {
			amountCondition.toWrapper(wrapper, COL_AMOUNT);
		}
		if (rateCondition != null) {
			rateCondition.toWrapper(wrapper, COL_RATE);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈id查询条件
	 * 
	 * @return busdIdCondition 商圈id查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈id查询条件
	 * 
	 * @return busdIdCondition 商圈id查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈id查询条件
	 * 
	 * @param busdIdCondition 商圈id查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回奖品标题查询条件
	 * 
	 * @return titleCondition 奖品标题查询条件
	 */
	public Condition<String> title() {
		this.titleCondition = new Condition<>();
		return this.titleCondition;
	}
	
	/**
	 * 获取奖品标题查询条件
	 * 
	 * @return titleCondition 奖品标题查询条件
	 */
	public Condition<String> getTitleCondition() {
		return titleCondition;
	}

	/**
	 * 设置奖品标题查询条件
	 * 
	 * @param titleCondition 奖品标题查询条件
	 */
	public void setTitleCondition(Condition<String> titleCondition) {
		this.titleCondition = titleCondition;
	}

	/**
	 * 构造并返回商品id查询条件
	 * 
	 * @return skuIdCondition 商品id查询条件
	 */
	public Condition<String> skuId() {
		this.skuIdCondition = new Condition<>();
		return this.skuIdCondition;
	}
	
	/**
	 * 获取商品id查询条件
	 * 
	 * @return skuIdCondition 商品id查询条件
	 */
	public Condition<String> getSkuIdCondition() {
		return skuIdCondition;
	}

	/**
	 * 设置商品id查询条件
	 * 
	 * @param skuIdCondition 商品id查询条件
	 */
	public void setSkuIdCondition(Condition<String> skuIdCondition) {
		this.skuIdCondition = skuIdCondition;
	}

	/**
	 * 构造并返回活动id查询条件
	 * 
	 * @return activityIdCondition 活动id查询条件
	 */
	public Condition<String> activityId() {
		this.activityIdCondition = new Condition<>();
		return this.activityIdCondition;
	}
	
	/**
	 * 获取活动id查询条件
	 * 
	 * @return activityIdCondition 活动id查询条件
	 */
	public Condition<String> getActivityIdCondition() {
		return activityIdCondition;
	}

	/**
	 * 设置活动id查询条件
	 * 
	 * @param activityIdCondition 活动id查询条件
	 */
	public void setActivityIdCondition(Condition<String> activityIdCondition) {
		this.activityIdCondition = activityIdCondition;
	}

	/**
	 * 构造并返回商品名称查询条件
	 * 
	 * @return spuTitleCondition 商品名称查询条件
	 */
	public Condition<String> spuTitle() {
		this.spuTitleCondition = new Condition<>();
		return this.spuTitleCondition;
	}
	
	/**
	 * 获取商品名称查询条件
	 * 
	 * @return spuTitleCondition 商品名称查询条件
	 */
	public Condition<String> getSpuTitleCondition() {
		return spuTitleCondition;
	}

	/**
	 * 设置商品名称查询条件
	 * 
	 * @param spuTitleCondition 商品名称查询条件
	 */
	public void setSpuTitleCondition(Condition<String> spuTitleCondition) {
		this.spuTitleCondition = spuTitleCondition;
	}

	/**
	 * 构造并返回奖品数量查询条件
	 * 
	 * @return amountCondition 奖品数量查询条件
	 */
	public Condition<Integer> amount() {
		this.amountCondition = new Condition<>();
		return this.amountCondition;
	}
	
	/**
	 * 获取奖品数量查询条件
	 * 
	 * @return amountCondition 奖品数量查询条件
	 */
	public Condition<Integer> getAmountCondition() {
		return amountCondition;
	}

	/**
	 * 设置奖品数量查询条件
	 * 
	 * @param amountCondition 奖品数量查询条件
	 */
	public void setAmountCondition(Condition<Integer> amountCondition) {
		this.amountCondition = amountCondition;
	}

	/**
	 * 构造并返回中奖概率查询条件
	 * 
	 * @return rateCondition 中奖概率查询条件
	 */
	public Condition<BigDecimal> rate() {
		this.rateCondition = new Condition<>();
		return this.rateCondition;
	}
	
	/**
	 * 获取中奖概率查询条件
	 * 
	 * @return rateCondition 中奖概率查询条件
	 */
	public Condition<BigDecimal> getRateCondition() {
		return rateCondition;
	}

	/**
	 * 设置中奖概率查询条件
	 * 
	 * @param rateCondition 中奖概率查询条件
	 */
	public void setRateCondition(Condition<BigDecimal> rateCondition) {
		this.rateCondition = rateCondition;
	}

}
